<include file="Inc/header" />
<div class="margin10px">
	<form name="addpage" method="post" action="<?php echo U('admin/acl/node_add');?>" onsubmit="return checkNode();">
		<table class="mytable">
			<tr>
				<th colspan="2">添加节点</th>
			</tr>
			<tr>
				<td width="100" class="tdf">父节点</td>
				<td><strong><?php echo $node_parents;?></strong><input type="hidden" value="<?php echo $node_pid;?>" name="node_pid" /></td>
			</tr>
			<tr>
				<td class="tdf">节点名称：</td>
				<td><input type="text" id="node_name" name="node_name" /><span></span> 例：xx添加</td>
			</tr>
			<tr>
				<td class="tdf">节点地址：</td>
				<td><input type="text" id="m_c_a" name="m_c_a" size="40" /><span></span> 例：以“/”分割（模块/控制器/动作），例子： admin/acl/node_add</td>
			</tr>
			<tr>
				<td class="tdf">节点等级：</td>
				<td>
					<select name="node_level" id="node_level">
						<option value="1" <?php if($nodel_level === 1){echo 'selected="selected"';} ?> >顶部菜单</option>
						<option value="2" <?php if($nodel_level === 2){echo 'selected="selected"';} ?> >左边一级菜单</option>
						<option value="3" <?php if($nodel_level === 3){echo 'selected="selected"';} ?> >左边二级菜单</option>
						<option value="4" <?php if($nodel_level!=1 && $nodel_level!=2 && $nodel_level!=3){echo 'selected="selected"';} ?> >隐藏式菜单</option>
					</select><span></span>
				</td>
			</tr>
			<tr>
				<td class="tdf">排序：</td>
				<td><input type="text" name="px" value="1" size="3" /></td>
			</tr>
			<tr>
				<td class="tdf">&nbsp;</td>
				<td><input type="submit" value="添加" class="button" /></td>
			</tr>
		</table>
	</form>
</div>
<script type="text/javascript">
	//检查表单
	function checkNode(){
		if($.trim($('#node_name').val())==''){
			$('#node_name').css('background-color','#ffc');
			$('#node_name').next('span').html('<font color=red> 分组名称不能为空</font>');
			$('#node_name').focus();
			return false;
		}
		if($.trim($('#m_c_a').val())==''){
			$('#m_c_a').css('background-color','#ffc');
			$('#m_c_a').next('span').html('<font color=red> 节点地址不能为空</font>');
			$('#m_c_a').focus();
			return false;
		}
        return true;
	}
</script>
<include file="Inc/footer" />